//
//  LawViewController.m
//  LocomotiveGuards
//
//  Created by iOS app dev on 16/9/21.
//  Copyright © 2016年 REDOOR. All rights reserved.
//

#import "LawViewController.h"

@interface LawViewController ()<UITableViewDelegate,UITableViewDataSource>

@end

@implementation LawViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.tableView = [[UITableView alloc]initWithFrame:CGRectMake(0, 20+44*H, SCREEN_WIDTH, SCREEN_HEIGHT-20-44*H-48) style:UITableViewStyleGrouped];
    self.tableView.delegate = self;
    self.tableView.dataSource = self;
    [self.view addSubview:self.tableView];
    [self createMyNav];
    
    
    
    
   
}
- (void)createMyNav
{
    self.view.backgroundColor = [UIColor colorWithRed:239.0/255 green:239.0/255 blue:244.0/255 alpha:1];
    [self addTitle:@"保险条例" imageName:@"保险条例"];
    [self addBackBtnTarget:self action:@selector(backBtnClick)];
}


#pragma mark - 点击事件
- (void)backBtnClick
{
    [self.navigationController popViewControllerAnimated:YES];
}




#pragma mark tableView 的代理和source
-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{

    return 1;

}


-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{

    return 1;


}



-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
{

    return 0.01;

}



-(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section
{

    return 0.01;

}


-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{


    return SCREEN_HEIGHT -44*H;



}


-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{

  static NSString *identifier = @"Cell";
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:identifier];
    if (cell == nil) {
        
        cell = [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier];
        cell.backgroundColor = [UIColor greenColor];
        
        
    }

    
    return cell;



}





@end
